package com.endpoint.book.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 爬虫源表
 * </p>
 *
 * @author liusp
 * @since 2025-06-21
 */
@TableName("crawl_source")
public class CrawlSource implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 源站名
     */
    private String sourceName;

    /**
     * 爬取规则（json串）
     */
    private String crawlRule;

    /**
     * 爬虫源状态，0：关闭，1：开启
     */
    private Boolean sourceStatus;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getCrawlRule() {
        return crawlRule;
    }

    public void setCrawlRule(String crawlRule) {
        this.crawlRule = crawlRule;
    }

    public Boolean getSourceStatus() {
        return sourceStatus;
    }

    public void setSourceStatus(Boolean sourceStatus) {
        this.sourceStatus = sourceStatus;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "CrawlSource{" +
        "id=" + id +
        ", sourceName=" + sourceName +
        ", crawlRule=" + crawlRule +
        ", sourceStatus=" + sourceStatus +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
